Along with Channels, Fabric has another feature called “Private

Data“ or “Private Data Collections” that facilitates the organizations

to share information on peer-to-peer basis using the gossip protocol.

But then, why is there a necessity of a private data, as we already

had channels, because a channel has the administration overhead of

the versions, policies, and MSP. As shown in Figure 13.5, the private

data set up is relatively simple and is not visible to the ordering

service. Here, the data resides only on the ledgers of the peers on

which it is shared and only the hash of the data is sent to the ledger

of the peers in that channel. The hash is a proof of the transaction

happening off-ledger. Refer to Figure 13.5, as follows:

Figure 13.5: Hyperledger Fabric Private Data

Please note that, unlike the data shared on the ledger through the

ordering service, the private data does not come with the

maintenance of historical data.

13.4 Interoperability with Oracles

Sometimes, our smart contracts need certain volatile information

from the outside world in order to execute the transactions, for

example, the current exchange rate of USD/INR or the spot price of

gold or a particular stock. For such information, the smart contract

needs the Oracle services, as shown in Figure 13.6. The latter can

connect to the external API and help the smart contract with the

information it seeks in a neutral way. Refer to Figure 13.6 as follows: